<!-- Copyright 2017 Google Inc. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================-->
<link rel="import" href="../node_modules/@bower_components/polymer/polymer.html">
<link rel="import" href="../node_modules/@bower_components/paper-button/paper-button.html">
<link rel="import" href="../node_modules/@bower_components/paper-slider/paper-slider.html">
<link rel="import" href="../node_modules/@bower_components/paper-dropdown-menu/paper-dropdown-menu.html">
<link rel="import" href="../node_modules/@bower_components/paper-listbox/paper-listbox.html">
<link rel="import" href="../node_modules/@bower_components/paper-item/paper-item.html">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="https://code.getmdl.io/1.3.0/material.indigo-pink.min.css">

<script defer src="https://code.getmdl.io/1.3.0/material.min.js"></script>

<dom-module id="nn-art">
  <style>
    .container {
      margin-left: 20px;
      margin-top: 20px;
    }
    #random {
      color: rgb(66,66,66);
      background-color: rgb(255,171,64);
    }
  </style>
<template>
  <div class="container">
    <canvas id="inference"></canvas>
    <br>
    <div>
      <paper-dropdown-menu no-animations label="Color mode">
        <paper-listbox attr-for-selected="value" id="color-mode-dropdown" class="dropdown-content" selected="{{selectedColorModeName}}" slot="dropdown-content">
          <template is="dom-repeat" items="[[colorModeNames]]">
            <paper-item value="[[item]]" label="[[item]]">
              [[item]]
            </paper-item>
          </template>
        </paper-listbox>
      </paper-dropdown-menu>
    </div>
    <div>
      <paper-dropdown-menu no-animations label="Activation function">
        <paper-listbox attr-for-selected="value" id="activation-function-dropdown" class="dropdown-content" selected="{{selectedActivationFunctionName}}" slot="dropdown-content">
          <template is="dom-repeat" items="[[activationFunctionNames]]">
            <paper-item value="[[item]]" label="[[item]]">
              [[item]]
            </paper-item>
          </template>
        </paper-listbox>
      </paper-dropdown-menu>
    </div>
    <br>
    <div>Number of layers: <div id="layers-count" style="display: inline-block"></div></div>
    <paper-slider pin min="0" max="10" value="3" id="layers-slider"></paper-slider>

    <div>z1 time coefficient</div>
    <paper-slider min="1" max="100" value="1" id="z1-slider"></paper-slider>

    <div>z2 time coefficient</div>
    <paper-slider min="1" max="100" value="1" id="z2-slider"></paper-slider>

    <paper-button type="button" id="random">randomize</paper-button>
    <br><br>
    <a href="http://blog.otoro.net/2016/03/25/generating-abstract-patterns-with-tensorflow/" target="_blank">What is a CPPN?</a>
  </div>
</template>
</dom-module>
